package com.hmall.common.clients;

import com.hmall.common.config.DefaultFeignConfiguration;
import com.hmall.common.pojo.Address;
import com.hmall.common.pojo.TbUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;


@FeignClient(value = "userservice",configuration = DefaultFeignConfiguration.class)
public interface UserClient {
    @GetMapping("/address/{address}")
    public Address getAddressById(@PathVariable Long address);

    @GetMapping("/user/{userId}")
    public TbUser getUser(@PathVariable Long userId);

}
